﻿@model LogModel
@{
    //page title
    ViewBag.Title = T("Admin.System.Log.ViewLogDetails").Text;

}
@using (Html.BeginForm())
{
    <div class="row">
        <div class="col-md-12">
            <div class="portlet light">
                <div class="section-header sticky">
                    <div class="caption">
                        <i class="icon-equalizer font-red-sunglo"></i>
                        <span class="caption-subject font-red-sunglo bold uppercase">  @T("Admin.System.Log.ViewLogDetails") </span>
                        <span class="caption-helper">@Html.ActionLink("(" + T("Admin.System.Log.BackToList") + ")", "List")</span>
                    </div>
                    <div class="tools">
                    </div>
                    <div class="actions">
                        <a class="btn btn-danger" data-toggle="modal" href="#logmodel-delete-confirmation">
                            <i class="fa fa-trash-o"></i>&nbsp;@T("Admin.Common.Delete")
                        </a>
                    </div>
                </div>
                <div class="portlet-body form form-horizontal form-bordered form-row-stripped">
                    <div class="form-body">
                        <h2 class="margin-bottom-20">  @Html.ValidationSummary(true)</h2>

                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.Frequency)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.Frequency)
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">  @Html.LangLabelFor(model => model.LogLevel)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    <span class='label label-@Model.LogLevelHint'>@Model.LogLevel</span>
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">  @Html.LangLabelFor(model => model.ShortMessage)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.ShortMessage)
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3"> @Html.LangLabelFor(model => model.ContentHash)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.ContentHash)
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">   @Html.LangLabelFor(model => model.IpAddress)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.IpAddress)
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3">      @Html.LangLabelFor(model => model.UserId)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @if (Model.UserId.HasValue)
                                    {
                                        @Html.ActionLink(!String.IsNullOrEmpty(Model.UserEmail) ? Model.UserEmail : T("Admin.Users.Guest").Text, "Edit", "User", new { id = Model.UserId }, new { })
                                    }
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3"> @Html.LangLabelFor(model => model.PageUrl)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.PageUrl)
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3"> @Html.LangLabelFor(model => model.ReferrerUrl)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.ReferrerUrl)
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3"> @Html.LangLabelFor(model => model.CreatedOn)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.CreatedOn)
                                </p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-3"> @Html.LangLabelFor(model => model.UpdatedOn)</label>
                            <div class="col-md-9">
                                <p class="form-control-static">
                                    @Html.DisplayFor(model => model.UpdatedOn)
                                </p>
                            </div>
                        </div>
                        @if (Model.FullMessage.HasValue())
                        {
                            <div class="form-group">
                                <label class="control-label col-md-3"> @Html.LangLabelFor(model => model.FullMessage)</label>
                                <div class="col-md-9">
                                    <pre>
                                        @Html.DisplayFor(model => model.FullMessage)
                                    </pre>
                                </div>
                            </div>
                        }

                    </div>
                </div>
            </div>
        </div>
    </div>
}
@Html.DeleteConfirmation("logitem-delete")
